BIN=code.exe
CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
FLAGS=-c
RM=rm -f


$(BIN):$(OBJ)
	@$(CC) $(LFLAGS) $@ $^
	@echo "linking ... $^ to $@"
%.o:%.c
	@$(CC) $(FLAGS) $< -g
	@echo "compling ... $< to $@"

.PHONY:clean
clean:
	$(RM) $(OBJ) $(BIN)

.PHONY:test
test:
	echo $(SRC)
	echo $(OBJ)




#$(BIN):$(SRC)
#	@$(CC) $(FLAGS) $@ $^1`1`
#	@echo "linking ... $^ to $@ "
#.PHONY:
#@clean:
#	@$(RM) $(BIN)
#	@echo "remove ... $(BIN) "


#.PHONY:text
#text:
	#@echo $(BIN
	#@echo $(CC)
	#@echo $(SRC)
	#@echo $(FLAGS)






